Minimize the number of operations